/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package jard.webshop.jsfbeans;

import jard.webshop.management.OrderManagement;
import jard.webshop.nbp.Order;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import javax.faces.bean.ViewScoped;

/**
 *
 * @author CJP
 */
@ManagedBean(name = "ordersBackingBean")
@RequestScoped
public class OrdersBackingBean implements Serializable {
    
    private OrderManagement om = OrderManagement.getInstance();
    private List<Order> allOrders = new ArrayList<Order>();

    /** Creates a new instance of OrderBackingBean */
    public OrdersBackingBean() {
        allOrders = om.getAllOrders();
    }
    
    public List<Order> getAllOrders() {
        return allOrders;
    }

}
